#include "proc.h"
#include <string.h>
#include <unistd.h>

#define SIZE 101
#define STYLE '#'

void process(){
  char bar[SIZE];
  const char* lable = "|\\-/";
  memset(bar, '\0', sizeof(bar));
  int i = 0;
  while(i <= 100){
    printf("[%-100s][%d%%][%c]\r", bar, i, lable[i % 4]);
    fflush(stdout);
    bar[i++] = STYLE;
    usleep(50000);
  }
  printf("\n");
}
